package com.example.feign.app1;

import com.example.common.core.Result;
import com.example.common.entity.DemoEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.time.LocalDate;

@FeignClient(value = "demo-app1", path = "/app1/hello")
public interface App1HelloClient {

    @GetMapping("/feign1")
    Result<Object> feign1(@RequestParam LocalDate date);

    @PostMapping("/feign2")
    Result<DemoEntity> feign2(@RequestBody DemoEntity bean);

    @PostMapping("/feign3")
    Result<DemoEntity> feign3(@RequestParam String param, @RequestBody DemoEntity bean);
}
